package com.summer.web.v1.clients;

import org.jolokia.client.J4pClient;
import org.jolokia.client.request.J4pReadRequest;
import org.jolokia.client.request.J4pReadResponse;

import java.util.Map;

public class JolokiasClient {

    public static void main(String[] args) throws Exception {
        J4pClient j4pClient = new J4pClient("http://localhost:8088/jolokia");
        J4pReadRequest req = new J4pReadRequest("jolokia.test:name=User");
        J4pReadResponse resp = j4pClient.execute(req);
        Map<String, Long> vals = resp.getValue();
        System.out.println(vals);
    }
}
